﻿// My methods here.
//-----------------------------------------------------------------------
// <Copyright file=LoaiKhuyenMai company=DHPD>
// Copyright (c) DHPD Corporation (http://dhpd.edu.vn). All rights reserved.
// </copyright>
// <author>HP</author>
//-----------------------------------------------------------------------


using System;
using System.Collections.Generic;
using KM.DAT;
using KM.ENT;
using KM.Models;

namespace KM.BUS
{
    /// <summary>
    /// This is busLoaiKhuyenMai class
    /// </summary>

    public class busLoaiKhuyenMai
    {
        public busLoaiKhuyenMai()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public void createEdit(entLoaiKhuyenMai entLKM)
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            datLKM.createEdit(entLKM);
        }
        public List<entLoaiKhuyenMai> getAllByChaId(int id)
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            List<entLoaiKhuyenMai> lst = new List<entLoaiKhuyenMai>();
            lst = datLKM.getAllByChaId(id);
            return lst;
        }
        public List<entLoaiKhuyenMai> getAll()
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            List<entLoaiKhuyenMai> lst = new List<entLoaiKhuyenMai>();
            lst = datLKM.getAll();
            return lst;
        }
        
        public List<entLoaiKhuyenMai> getAll(ref PagingInfoModel page)
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            List<entLoaiKhuyenMai> lst = new List<entLoaiKhuyenMai>();
            lst = datLKM.getAll(ref page);
            return lst;
        }
        public List<entLoaiKhuyenMai> getAllByForeignKey(int Id, ref PagingInfoModel page)
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            List<entLoaiKhuyenMai> lst = new List<entLoaiKhuyenMai>();
            lst = datLKM.getAllByForeignKey(Id, ref page);
            return lst;
        }
        public entLoaiKhuyenMai getInfo(int Id)
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            entLoaiKhuyenMai entLKM = new entLoaiKhuyenMai();
            entLKM = datLKM.getInfo(Id);
            return entLKM;
        }
        public entLoaiKhuyenMai getInfo(string Id)
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            entLoaiKhuyenMai entLKM = new entLoaiKhuyenMai();
            entLKM = datLKM.getInfo(Id);
            return entLKM;
        }
        public bool delete(int Id)
        {
            datLoaiKhuyenMai datLKM = new datLoaiKhuyenMai();
            datLKM.delete(Id);
            return true;
        }
     
       
    }
}
